<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <title>VUE学习 - delete请求</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!--载入vue.js-->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>

<body>
    https://juejin.cn/post/7072704649706504200#heading-9
    <div id="Application">
        <button onclick="test1()">测试触发</button>

        <button onclick="test5()">发出DELETE请求</button>

    </div>
    <script>
        function test1() {
            console.log("触发成功")
        }

        async function test5() {

            let result = await axios(
                {
                    url: 'http://localhost:3000/api/delbook',
                    method: 'DELETE',
                    params: {
                        id: '19',
                    }
                })
            console.log(result);
        }
    </script>

</body>

</html>